<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>我的预约-预约详情</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
	<link rel="stylesheet" href="__PUBLIC__/client/css/cui.css?sj={$tj}" />
	<link rel="stylesheet" href="__PUBLIC__/auntie/css/style.css?sj={$tj}" />
	<script type="text/javascript" src="__PUBLIC__/client/js/jquery.js"></script>
</head>
<body class="mhome bgf">
	<div class="viewport">
		<div id="bd" class="fix">
            <div class="box-make">
                <div class="con">
                    <div class="pic"><img src="{$uimg}" alt="" style="border-radius: 46px;width: 46px;height: 46px;overflow: hidden;"></div>
                    <div class="txt">
                        <h4>{$order.name}  {$order.phone}</h4>
                       <!-- <span>预约时间：5分钟前</span>-->
                        <p>取送日期：{$order.pickup_date}</p>
                        <p>取送时间段：{$order.pickup_time}</p>
                    </div>

                   <a href="" class="dian"><img src="__PUBLIC__/client/images/hm-ico-{$order.wash_type}.png" alt=""></a>
                </div>
                <p class="p1">Ta在：{$order.address}</p>
            </div>
            <h3 class="tit-make">预约了一次 <foreach name="entry" item="vo" > <if condition="$key eq $order['wash_type']"> {$vo} </if> </foreach> 服务 </h3>            
    
           <in name="order.wash_type" value="1,2,3">
	            <div class="m-round">
	            		<a href="javascript:;" id="submitcl" data-orderid="{$order.orderid}" class="btn-round">确认<br>收衣</a>
	           		<if condition="$order['is_dai_jian'] ==1 || $order['is_dai_jian'] ==0 " >
		          	  <a href="{:U('Auntie/Index/yidan',array('orderid'=>$order['orderid']))}" class="btn-lz">衣单</a>
		            </if>
	            </div>
	             <if condition="$order['total_price']" >
	           		 <p class="m-sums">应付金额：<em>￥{$order.total_price}</em></p>
	           	</if>
           	<else />
           		<div class="m-round">
           	            	 <a href="javascript:;" id="submitjieesouyi" data-orderid="{$order.orderid}" class="btn-round">确认<br>收衣</a>
           		</div>
           	<p class="m-sums" style="width: 260px;">请输入应付金额：<em>￥ <input type="text" id="shurudejinge"  style="display:inline; height: 34px; font-size: 30px; border: 0px; color: red; width: 90px;"></em></p>
           	</in>
		</div>
		<!--end #bd-->
	</div>
	<style>
	.address_box{
		border-radius:9px;
	}
	.address_box p{
		padding-bottom: 10px;
		text-align: center;
	}
	.address_box ul li span.add_info {
		float: none;
		margin-top: 0px;
	}
	.address_box .caidan{
		display: block;
		width: 50%;
		float: left;
		text-align: center;
		padding: 0px;
		margin: 0px;
	}
	.address_box .xian{
		border-right: 1px solid #eee;
	}
</style>
	<div id="order_bg"></div>
	<div class="address_box" style="z-index:9999;">
		<p>支付方式选择</p>
		<ul id="address_box_ul">
				<li>		
					<span class="add_info" >
						<i class="sel" data-type = "xs"></i>线上支付
						<div class="c"></div>
					</span>
				</li>
				<li>		
					<span class="add_info" >
						<i class="" data-type = "xj"></i>现金支付
						<div class="c"></div>
					</span>
				</li>
		</ul>
		<span class="caidan xian"> <a href="javascript:;" id="guanbi">取消</a> </span>
		<span class="caidan"> <a href="javascript:;" id="queding">确定</a>  </span>
	</div>
	
	<script src="__PUBLIC__/business/js/normal.js?sj={$tj}"></script>
	<script>
		$(function(){
			var boxH = $('.address_box').height();
			$('.address_box').css('top',($(window).height()-boxH-10)/2);
			$('.address_box').css('width',$(window).width()-100);
			$('.address_box').css('left',50);
			$('.address_box li').on('click',function(){
				$('.address_box li').find('i').removeClass('sel');
				$(this).find('i').addClass('sel');
				var type=$(this).find('i').data('type');
				$('#queding').data('types',type);
			});
			//================
			$('#guanbi').on('click',function(){
				$('#order_bg').hide();
				$('.address_box').hide();
			});
			//================
			$('#queding').on('click',function(){
				var orderid=$(this).attr("orderid");
				var jinge=$(this).attr("jinge");
				var type=$(this).attr('type');
				var types=$(this).data('types');
				if(types=='xj'){
					var tourl="{:U('Auntie/api/souyixianjin')}";
					if(type=='jinge'){
						if(!jinge){
		       				Msg('请输入金额！',2);
		       				return false;
		       			}
						var data={orderid:orderid,jinge:jinge};
					}else{
						var data={orderid:orderid};
					}
       				$.post(tourl,data,function(data){
					    if(data.status!=1){
					    		Msg('失败！',2);
					    }else{
					    		Msg('确认完成！',1);
					    		setTimeout(function(){
								window.location.href="{:U('Auntie/index/order01')}";
							},1000);
					    }
					 });
				}else{
					//=================================
					var tourl="{:U('Auntie/api/souyi')}";
					if(type=='jinge'){
						if(!jinge){
		       				Msg('请输入金额！',2);
		       				return false;
		       			}
						var data={orderid:orderid,jinge:jinge};
					}else{
						var data={orderid:orderid};
					}
	       			$.post(tourl,data,function(data){
					    if(data.status!=1){
					    		Msg('失败！',2);
					    }else{
					    		Msg('确认完成！',1);
					    		setTimeout(function(){
								window.location.href="{:U('Auntie/index/order01')}";
							},1000);
					    }
					 });
					 //=================================
				}
			});
			//确认收衣===========
			$('#submitcl').on('click',function(){
				var total_prc='{$order.total_price}';
				if(!total_prc){
					Msg('请点击衣单，选好衣物在来确认收衣！',2);
					return false;
				}
				$('#order_bg').show();
				$('.address_box').show();
				var orderid=$(this).attr("data-orderid");
				$('#queding').attr({"orderid":orderid,'type':'nojinge'});
				return false;
			});
			//确认收衣=========
			$('#submitjieesouyi').on('click',function(){
				
				var orderid=$(this).attr("data-orderid");
				var jinge=$('#shurudejinge').val();
				if(!jinge){
	       				Msg('请输入金额！',2);
	       				return false;
	       		}
				$('#queding').attr({"orderid":orderid,'jinge':jinge,'type':'jinge'});
				
				$('#order_bg').show();
				$('.address_box').show();
				return false;
			});
		});
	</script>
</body>
</html>